package io;
import java.io.Console;
import java.io.UnsupportedEncodingException;

public class Test {

	/**
	 * @param args
	 * @throws UnsupportedEncodingException
	 */
	public static void main(String[] args) throws UnsupportedEncodingException {
		String s = "中csst";
		System.out.println(s.length());
		System.out.println(s.getBytes().length);
		System.out.println(s.getBytes("UTF-8").length);
		System.out.println(s.getBytes("UTF-16").length);
		System.out.println(s.getBytes("UTF-32").length);
		System.out.println("****************************************");
		s = "武汉csst";
		System.out.println(s.length());
		System.out.println(s.getBytes().length);
		System.out.println(s.getBytes("UTF-8").length);
		System.out.println(s.getBytes("UTF-16").length);
		System.out.println(s.getBytes("UTF-32").length);
		System.out.println("****************************************");
		s = "研究院csst";
		System.out.println(s.length());
		System.out.println(s.getBytes().length);
		System.out.println(s.getBytes("UTF-8").length);
		System.out.println(s.getBytes("UTF-16").length);
		System.out.println(s.getBytes("UTF-32").length);
		System.out.println("****************************************");

		Console console = System.console();
		String input = console.readLine("Please enter a number between 1 and 10: ");
		int max = Integer.parseInt(input);
		for (int i = 1; i < max; i++) {
			console.printf("%d\n", i * i);
		}

	}

}
